﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AlarmClock
{
    class Sender //闹钟调用类，给闹钟添加事件方法
    {
        public Clock clock;
        void Tick(object a)
        {
            Console.WriteLine("滴答~~");
        }
        void Alarm(object a)
        {
            Console.WriteLine("闹钟响啦~~");
        }
        public Sender(int hour,int minute,int second)
        {
            clock = new Clock(hour, minute, second);
            clock.Alarm += Alarm;
            clock.Tick += Tick;
        }

    }
}
